package com.mldong.modules.sys.enums;

import com.mldong.exception.CommonError;
import com.mldong.exception.ErrEnum;

/**
 * 权限模块错误码
 */
@ErrEnum(name="auth",value="权限错误码",bizCode=1000,min=0,max=100)
public enum AuthErrEnum implements CommonError {
    USERNAME_OR_PASSWORD_ERR(10000001,"用户名或密码错误"),
    TOKEN_EXPIRE(99990403, "token不存在或已过期"),
    NOT_AUTH(10000003,"您没有权限访问，请联系管理员！"),
    USER_LOCKED(10000004,"用户已被锁定，请联系管理员!"),
    NEW_OLD_PASSWORD_NOT_EQ(10000005,"新旧密码不能相同"),

    ;
    private Integer code;
    private String message;
    AuthErrEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
